import pygame, sys
from pygame.locals import *

# white = 255, 255, 255
# black = 0, 0, 0

# pygame.init()

# screen = pygame.display.set_mode((600, 500))
# myfront = pygame.font.Font(None, 60)
# textImage = myfront.render("Hello Pygame", True, black)

# while True:
#     for event in pygame.event.get():
#         if event.type in (QUIT, KEYDOWN):
#             sys.exit()
#     screen.fill(white)
#     screen.blit(textImage, (100, 100))
#     pygame.display.update()
pygame.mixer.init()
#加载音乐
pygame.mixer.music.load(r'D:/py/pygame/sounds/111.mp3')
while True:
    #检查音乐流播放，有返回True，没有返回False
    #如果没有音乐流则选择播放
    if pygame.mixer.music.get_busy() == False:
        pygame.mixer.music.play()
# pygame.mixer.init()
# pygame.mixer.music.load('D:/py/pygame/sounds/111.mp3')
# pygame.mixer.music.play(-1)